import React from 'react';
import { Card } from 'antd';

class page extends React.Component {
  render() {
    const { children, bodyStyle } = this.props;
    let bdStyle = bodyStyle;
    if (!bodyStyle) {
      let padding = '24px 24px 0';
      if (window.isPad) padding = '16px 16px 0';
      if (window.isMobile) padding = '8px 8px 0';
      bdStyle = { padding };
    }

    return (
      <Card
        bordered={false}
        bodyStyle={bdStyle}
      >
        {children}
      </Card>
    );
  }
}

export default page;
